class AddOrganRank < Mutations::Command
  include Wisper::Publisher
  
  required do
    string :name
  end

  def execute
    rank = Organization::Rank.new inputs
    if rank.save
      return rank
    else
      rank.errors.each do |key, value|
        add_error(key, key, value)
      end
    end
  end
  
end